package com.jiaai.web.zfp_back.system;

import com.alibaba.dubbo.config.annotation.Reference;
import com.jiaai.exception.ServerException;
import com.jiaai.system.api.ILivePermission;
import com.jiaai.util.RestResultGenerator;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 *
 */
@RequestMapping("/api/v1/admin/livePermission")
@RestController
public class AdminLivePermissionControll {

    @Reference
    private ILivePermission livePermission;


    @PostMapping("/edit")
    public Object edit(@RequestParam  Map<String,Object> params)throws ServerException{
         livePermission.edit(params);
         return RestResultGenerator.genSuccessResult();
    }

    @PostMapping("/add")
    public Object add(@RequestBody Map<String,Object> params)throws ServerException{
        livePermission.edit(params);
        return RestResultGenerator.genSuccessResult();
    }

}
